package com.xnyzc.lhy.common.penum.driver;

public enum EAccountStatusType {

    normal(0,"正常"),
    submit(1,"待提交"),
    audit(2, "待审核"),
    auditRejected(3, "审核驳回"),
    inactive(4, "未激活"),
    titles(5, "封号中");

    private Integer type;
    private String value;

    EAccountStatusType(Integer type, String value){
        this.type = type;
        this.value = value;
    }


    public static EAccountStatusType findById(Integer type){
        EAccountStatusType eSexType;
        switch (type){
            case 0:
                eSexType  = EAccountStatusType.normal;
                break;
            case 1:
                eSexType  = EAccountStatusType.submit;
                break;
            case 2:
                eSexType = EAccountStatusType.audit;
                break;
            case 3:
                eSexType = EAccountStatusType.auditRejected;
                break;
            case 4:
                eSexType = EAccountStatusType.inactive;
                break;
            case 5:
                eSexType = EAccountStatusType.titles;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return eSexType;
    }

    public String getValue() {
        return this.value;
    }
}
